# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9117) END FROM WidgetInst WHERE WidgetInstId = 9117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9143) END FROM WidgetInst WHERE WidgetInstId = 9143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9143) END FROM WidgetInst WHERE WidgetInstId = 9143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9143) END FROM WidgetInst WHERE WidgetInstId = 9143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9155) END FROM WidgetInst WHERE WidgetInstId = 9155)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9155) END FROM WidgetInst WHERE WidgetInstId = 9155)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9173) END FROM WidgetInst WHERE WidgetInstId = 9173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9173) END FROM WidgetInst WHERE WidgetInstId = 9173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9157) END FROM WidgetInst WHERE WidgetInstId = 9157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9218) END FROM WidgetInst WHERE WidgetInstId = 9218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9218) END FROM WidgetInst WHERE WidgetInstId = 9218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9218) END FROM WidgetInst WHERE WidgetInstId = 9218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9234) END FROM WidgetInst WHERE WidgetInstId = 9234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9234) END FROM WidgetInst WHERE WidgetInstId = 9234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9234) END FROM WidgetInst WHERE WidgetInstId = 9234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9274) END FROM WidgetInst WHERE WidgetInstId = 9274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9274) END FROM WidgetInst WHERE WidgetInstId = 9274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9274) END FROM WidgetInst WHERE WidgetInstId = 9274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9280) END FROM WidgetInst WHERE WidgetInstId = 9280) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9274) END FROM WidgetInst WHERE WidgetInstId = 9274)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9280) END FROM WidgetInst WHERE WidgetInstId = 9280) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9274) END FROM WidgetInst WHERE WidgetInstId = 9274)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9280) END FROM WidgetInst WHERE WidgetInstId = 9280) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9274) END FROM WidgetInst WHERE WidgetInstId = 9274)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9289) END FROM WidgetInst WHERE WidgetInstId = 9289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9289) END FROM WidgetInst WHERE WidgetInstId = 9289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9289) END FROM WidgetInst WHERE WidgetInstId = 9289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9289) END FROM WidgetInst WHERE WidgetInstId = 9289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9313) END FROM WidgetInst WHERE WidgetInstId = 9313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9313) END FROM WidgetInst WHERE WidgetInstId = 9313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9313) END FROM WidgetInst WHERE WidgetInstId = 9313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9313) END FROM WidgetInst WHERE WidgetInstId = 9313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9350) END FROM WidgetInst WHERE WidgetInstId = 9350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9351;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9361;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9361;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9361;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9361;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9361;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9361;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9362;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9362;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9362;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9362;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9362;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9362;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9363;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9363;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9363;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9363;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9363;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9363;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9364;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9364;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9364;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9364;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9364;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9373) END FROM WidgetInst WHERE WidgetInstId = 9373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9374) END FROM WidgetInst WHERE WidgetInstId = 9374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9375) END FROM WidgetInst WHERE WidgetInstId = 9375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9376) END FROM WidgetInst WHERE WidgetInstId = 9376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9441) END FROM WidgetInst WHERE WidgetInstId = 9441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9443) END FROM WidgetInst WHERE WidgetInstId = 9443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9444) END FROM WidgetInst WHERE WidgetInstId = 9444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9441) END FROM WidgetInst WHERE WidgetInstId = 9441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9443) END FROM WidgetInst WHERE WidgetInstId = 9443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9444) END FROM WidgetInst WHERE WidgetInstId = 9444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9477) END FROM WidgetInst WHERE WidgetInstId = 9477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9478) END FROM WidgetInst WHERE WidgetInstId = 9478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9479) END FROM WidgetInst WHERE WidgetInstId = 9479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9480) END FROM WidgetInst WHERE WidgetInstId = 9480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9477) END FROM WidgetInst WHERE WidgetInstId = 9477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9478) END FROM WidgetInst WHERE WidgetInstId = 9478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9479) END FROM WidgetInst WHERE WidgetInstId = 9479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9480) END FROM WidgetInst WHERE WidgetInstId = 9480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9477) END FROM WidgetInst WHERE WidgetInstId = 9477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9478) END FROM WidgetInst WHERE WidgetInstId = 9478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9479) END FROM WidgetInst WHERE WidgetInstId = 9479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9480) END FROM WidgetInst WHERE WidgetInstId = 9480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9525) END FROM WidgetInst WHERE WidgetInstId = 9525)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9526) END FROM WidgetInst WHERE WidgetInstId = 9526)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9527) END FROM WidgetInst WHERE WidgetInstId = 9527)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9528) END FROM WidgetInst WHERE WidgetInstId = 9528)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9525) END FROM WidgetInst WHERE WidgetInstId = 9525)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9526) END FROM WidgetInst WHERE WidgetInstId = 9526)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9527) END FROM WidgetInst WHERE WidgetInstId = 9527)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9528) END FROM WidgetInst WHERE WidgetInstId = 9528)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9597) END FROM WidgetInst WHERE WidgetInstId = 9597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9598) END FROM WidgetInst WHERE WidgetInstId = 9598) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9599) END FROM WidgetInst WHERE WidgetInstId = 9599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9600) END FROM WidgetInst WHERE WidgetInstId = 9600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9597) END FROM WidgetInst WHERE WidgetInstId = 9597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9598) END FROM WidgetInst WHERE WidgetInstId = 9598) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9599) END FROM WidgetInst WHERE WidgetInstId = 9599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9600) END FROM WidgetInst WHERE WidgetInstId = 9600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9533) END FROM WidgetInst WHERE WidgetInstId = 9533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9534) END FROM WidgetInst WHERE WidgetInstId = 9534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9535) END FROM WidgetInst WHERE WidgetInstId = 9535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9536) END FROM WidgetInst WHERE WidgetInstId = 9536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9777) END FROM WidgetInst WHERE WidgetInstId = 9777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9778) END FROM WidgetInst WHERE WidgetInstId = 9778) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9779) END FROM WidgetInst WHERE WidgetInstId = 9779) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9780) END FROM WidgetInst WHERE WidgetInstId = 9780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9777) END FROM WidgetInst WHERE WidgetInstId = 9777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9778) END FROM WidgetInst WHERE WidgetInstId = 9778) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9779) END FROM WidgetInst WHERE WidgetInstId = 9779) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9780) END FROM WidgetInst WHERE WidgetInstId = 9780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9777) END FROM WidgetInst WHERE WidgetInstId = 9777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9778) END FROM WidgetInst WHERE WidgetInstId = 9778) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9779) END FROM WidgetInst WHERE WidgetInstId = 9779) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9780) END FROM WidgetInst WHERE WidgetInstId = 9780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9841) END FROM WidgetInst WHERE WidgetInstId = 9841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9842) END FROM WidgetInst WHERE WidgetInstId = 9842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9843) END FROM WidgetInst WHERE WidgetInstId = 9843) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9844) END FROM WidgetInst WHERE WidgetInstId = 9844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9841) END FROM WidgetInst WHERE WidgetInstId = 9841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9842) END FROM WidgetInst WHERE WidgetInstId = 9842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9843) END FROM WidgetInst WHERE WidgetInstId = 9843) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9844) END FROM WidgetInst WHERE WidgetInstId = 9844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9841) END FROM WidgetInst WHERE WidgetInstId = 9841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9842) END FROM WidgetInst WHERE WidgetInstId = 9842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9843) END FROM WidgetInst WHERE WidgetInstId = 9843) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9844) END FROM WidgetInst WHERE WidgetInstId = 9844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9921) END FROM WidgetInst WHERE WidgetInstId = 9921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9922) END FROM WidgetInst WHERE WidgetInstId = 9922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9923) END FROM WidgetInst WHERE WidgetInstId = 9923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9924) END FROM WidgetInst WHERE WidgetInstId = 9924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9921) END FROM WidgetInst WHERE WidgetInstId = 9921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9922) END FROM WidgetInst WHERE WidgetInstId = 9922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9923) END FROM WidgetInst WHERE WidgetInstId = 9923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9924) END FROM WidgetInst WHERE WidgetInstId = 9924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9921) END FROM WidgetInst WHERE WidgetInstId = 9921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9922) END FROM WidgetInst WHERE WidgetInstId = 9922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9923) END FROM WidgetInst WHERE WidgetInstId = 9923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9924) END FROM WidgetInst WHERE WidgetInstId = 9924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10001) END FROM WidgetInst WHERE WidgetInstId = 10001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10002) END FROM WidgetInst WHERE WidgetInstId = 10002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10003) END FROM WidgetInst WHERE WidgetInstId = 10003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10004) END FROM WidgetInst WHERE WidgetInstId = 10004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10001) END FROM WidgetInst WHERE WidgetInstId = 10001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10002) END FROM WidgetInst WHERE WidgetInstId = 10002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10003) END FROM WidgetInst WHERE WidgetInstId = 10003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10004) END FROM WidgetInst WHERE WidgetInstId = 10004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10001) END FROM WidgetInst WHERE WidgetInstId = 10001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10002) END FROM WidgetInst WHERE WidgetInstId = 10002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10003) END FROM WidgetInst WHERE WidgetInstId = 10003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10004) END FROM WidgetInst WHERE WidgetInstId = 10004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10025) END FROM WidgetInst WHERE WidgetInstId = 10025) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10001) END FROM WidgetInst WHERE WidgetInstId = 10001)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10026) END FROM WidgetInst WHERE WidgetInstId = 10026) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10002) END FROM WidgetInst WHERE WidgetInstId = 10002)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10027) END FROM WidgetInst WHERE WidgetInstId = 10027) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10003) END FROM WidgetInst WHERE WidgetInstId = 10003)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10028) END FROM WidgetInst WHERE WidgetInstId = 10028) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10004) END FROM WidgetInst WHERE WidgetInstId = 10004)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10025) END FROM WidgetInst WHERE WidgetInstId = 10025) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10001) END FROM WidgetInst WHERE WidgetInstId = 10001)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10026) END FROM WidgetInst WHERE WidgetInstId = 10026) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10002) END FROM WidgetInst WHERE WidgetInstId = 10002)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10027) END FROM WidgetInst WHERE WidgetInstId = 10027) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10003) END FROM WidgetInst WHERE WidgetInstId = 10003)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10028) END FROM WidgetInst WHERE WidgetInstId = 10028) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10004) END FROM WidgetInst WHERE WidgetInstId = 10004)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10025) END FROM WidgetInst WHERE WidgetInstId = 10025) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10001) END FROM WidgetInst WHERE WidgetInstId = 10001)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10026) END FROM WidgetInst WHERE WidgetInstId = 10026) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10002) END FROM WidgetInst WHERE WidgetInstId = 10002)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10027) END FROM WidgetInst WHERE WidgetInstId = 10027) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10003) END FROM WidgetInst WHERE WidgetInstId = 10003)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10028) END FROM WidgetInst WHERE WidgetInstId = 10028) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10004) END FROM WidgetInst WHERE WidgetInstId = 10004)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10061) END FROM WidgetInst WHERE WidgetInstId = 10061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10062) END FROM WidgetInst WHERE WidgetInstId = 10062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10063) END FROM WidgetInst WHERE WidgetInstId = 10063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10064) END FROM WidgetInst WHERE WidgetInstId = 10064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10061) END FROM WidgetInst WHERE WidgetInstId = 10061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10062) END FROM WidgetInst WHERE WidgetInstId = 10062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10063) END FROM WidgetInst WHERE WidgetInstId = 10063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10064) END FROM WidgetInst WHERE WidgetInstId = 10064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10061) END FROM WidgetInst WHERE WidgetInstId = 10061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10062) END FROM WidgetInst WHERE WidgetInstId = 10062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10063) END FROM WidgetInst WHERE WidgetInstId = 10063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10064) END FROM WidgetInst WHERE WidgetInstId = 10064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10061) END FROM WidgetInst WHERE WidgetInstId = 10061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10062) END FROM WidgetInst WHERE WidgetInstId = 10062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10063) END FROM WidgetInst WHERE WidgetInstId = 10063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10064) END FROM WidgetInst WHERE WidgetInstId = 10064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10157) END FROM WidgetInst WHERE WidgetInstId = 10157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10158) END FROM WidgetInst WHERE WidgetInstId = 10158) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10159) END FROM WidgetInst WHERE WidgetInstId = 10159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10160) END FROM WidgetInst WHERE WidgetInstId = 10160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10157) END FROM WidgetInst WHERE WidgetInstId = 10157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10158) END FROM WidgetInst WHERE WidgetInstId = 10158) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10159) END FROM WidgetInst WHERE WidgetInstId = 10159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10160) END FROM WidgetInst WHERE WidgetInstId = 10160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10157) END FROM WidgetInst WHERE WidgetInstId = 10157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10158) END FROM WidgetInst WHERE WidgetInstId = 10158) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10159) END FROM WidgetInst WHERE WidgetInstId = 10159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10160) END FROM WidgetInst WHERE WidgetInstId = 10160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10157) END FROM WidgetInst WHERE WidgetInstId = 10157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10158) END FROM WidgetInst WHERE WidgetInstId = 10158) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10159) END FROM WidgetInst WHERE WidgetInstId = 10159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10160) END FROM WidgetInst WHERE WidgetInstId = 10160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10248) END FROM WidgetInst WHERE WidgetInstId = 10248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10248) END FROM WidgetInst WHERE WidgetInstId = 10248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10248) END FROM WidgetInst WHERE WidgetInstId = 10248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10248) END FROM WidgetInst WHERE WidgetInstId = 10248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10276;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10248) END FROM WidgetInst WHERE WidgetInstId = 10248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10248) END FROM WidgetInst WHERE WidgetInstId = 10248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9361) END FROM WidgetInst WHERE WidgetInstId = 9361) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9362) END FROM WidgetInst WHERE WidgetInstId = 9362) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9363) END FROM WidgetInst WHERE WidgetInstId = 9363) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9364) END FROM WidgetInst WHERE WidgetInstId = 9364) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10305) END FROM WidgetInst WHERE WidgetInstId = 10305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10306) END FROM WidgetInst WHERE WidgetInstId = 10306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10307) END FROM WidgetInst WHERE WidgetInstId = 10307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10308) END FROM WidgetInst WHERE WidgetInstId = 10308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10312;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10319;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10319;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10319;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10319;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10319;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10322) END FROM WidgetInst WHERE WidgetInstId = 10322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10339) END FROM WidgetInst WHERE WidgetInstId = 10339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10339) END FROM WidgetInst WHERE WidgetInstId = 10339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10348) END FROM WidgetInst WHERE WidgetInstId = 10348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10348) END FROM WidgetInst WHERE WidgetInstId = 10348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10348) END FROM WidgetInst WHERE WidgetInstId = 10348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10360) END FROM WidgetInst WHERE WidgetInstId = 10360)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10360) END FROM WidgetInst WHERE WidgetInstId = 10360)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10378) END FROM WidgetInst WHERE WidgetInstId = 10378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10378) END FROM WidgetInst WHERE WidgetInstId = 10378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10362) END FROM WidgetInst WHERE WidgetInstId = 10362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10423) END FROM WidgetInst WHERE WidgetInstId = 10423) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10423) END FROM WidgetInst WHERE WidgetInstId = 10423) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10423) END FROM WidgetInst WHERE WidgetInstId = 10423) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10439) END FROM WidgetInst WHERE WidgetInstId = 10439) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10439) END FROM WidgetInst WHERE WidgetInstId = 10439) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10439) END FROM WidgetInst WHERE WidgetInstId = 10439) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10459) END FROM WidgetInst WHERE WidgetInstId = 10459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10459) END FROM WidgetInst WHERE WidgetInstId = 10459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10459) END FROM WidgetInst WHERE WidgetInstId = 10459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10479) END FROM WidgetInst WHERE WidgetInstId = 10479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10479) END FROM WidgetInst WHERE WidgetInstId = 10479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10479) END FROM WidgetInst WHERE WidgetInstId = 10479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10485) END FROM WidgetInst WHERE WidgetInstId = 10485) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10479) END FROM WidgetInst WHERE WidgetInstId = 10479)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10485) END FROM WidgetInst WHERE WidgetInstId = 10485) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10479) END FROM WidgetInst WHERE WidgetInstId = 10479)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10485) END FROM WidgetInst WHERE WidgetInstId = 10485) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10479) END FROM WidgetInst WHERE WidgetInstId = 10479)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10518) END FROM WidgetInst WHERE WidgetInstId = 10518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10518) END FROM WidgetInst WHERE WidgetInstId = 10518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10518) END FROM WidgetInst WHERE WidgetInstId = 10518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10518) END FROM WidgetInst WHERE WidgetInstId = 10518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10540) END FROM WidgetInst WHERE WidgetInstId = 10540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10540) END FROM WidgetInst WHERE WidgetInstId = 10540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10540) END FROM WidgetInst WHERE WidgetInstId = 10540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10540) END FROM WidgetInst WHERE WidgetInstId = 10540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10540) END FROM WidgetInst WHERE WidgetInstId = 10540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10540) END FROM WidgetInst WHERE WidgetInstId = 10540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10319) END FROM WidgetInst WHERE WidgetInstId = 10319) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10555) END FROM WidgetInst WHERE WidgetInstId = 10555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10599) END FROM WidgetInst WHERE WidgetInstId = 10599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10601) END FROM WidgetInst WHERE WidgetInstId = 10601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10594) END FROM WidgetInst WHERE WidgetInstId = 10594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 10678) END FROM WidgetInst WHERE WidgetInstId = 10678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 10691) END FROM WidgetInst WHERE WidgetInstId = 10691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 10696) END FROM WidgetInst WHERE WidgetInstId = 10696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 10696) END FROM WidgetInst WHERE WidgetInstId = 10696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10714;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10728;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10728;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10728;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10728;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10728;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10731) END FROM WidgetInst WHERE WidgetInstId = 10731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10757) END FROM WidgetInst WHERE WidgetInstId = 10757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10757) END FROM WidgetInst WHERE WidgetInstId = 10757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10757) END FROM WidgetInst WHERE WidgetInstId = 10757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10769) END FROM WidgetInst WHERE WidgetInstId = 10769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10769) END FROM WidgetInst WHERE WidgetInstId = 10769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10787) END FROM WidgetInst WHERE WidgetInstId = 10787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10787) END FROM WidgetInst WHERE WidgetInstId = 10787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10771) END FROM WidgetInst WHERE WidgetInstId = 10771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10832) END FROM WidgetInst WHERE WidgetInstId = 10832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10832) END FROM WidgetInst WHERE WidgetInstId = 10832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10832) END FROM WidgetInst WHERE WidgetInstId = 10832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10848) END FROM WidgetInst WHERE WidgetInstId = 10848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10848) END FROM WidgetInst WHERE WidgetInstId = 10848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10848) END FROM WidgetInst WHERE WidgetInstId = 10848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10868) END FROM WidgetInst WHERE WidgetInstId = 10868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10868) END FROM WidgetInst WHERE WidgetInstId = 10868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10868) END FROM WidgetInst WHERE WidgetInstId = 10868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10888) END FROM WidgetInst WHERE WidgetInstId = 10888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10888) END FROM WidgetInst WHERE WidgetInstId = 10888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10888) END FROM WidgetInst WHERE WidgetInstId = 10888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10894) END FROM WidgetInst WHERE WidgetInstId = 10894) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10888) END FROM WidgetInst WHERE WidgetInstId = 10888)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10894) END FROM WidgetInst WHERE WidgetInstId = 10894) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10888) END FROM WidgetInst WHERE WidgetInstId = 10888)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10894) END FROM WidgetInst WHERE WidgetInstId = 10894) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10888) END FROM WidgetInst WHERE WidgetInstId = 10888)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10903) END FROM WidgetInst WHERE WidgetInstId = 10903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10903) END FROM WidgetInst WHERE WidgetInstId = 10903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10903) END FROM WidgetInst WHERE WidgetInstId = 10903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10903) END FROM WidgetInst WHERE WidgetInstId = 10903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10728) END FROM WidgetInst WHERE WidgetInstId = 10728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10927) END FROM WidgetInst WHERE WidgetInstId = 10927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10927) END FROM WidgetInst WHERE WidgetInstId = 10927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10927) END FROM WidgetInst WHERE WidgetInstId = 10927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10927) END FROM WidgetInst WHERE WidgetInstId = 10927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10949) END FROM WidgetInst WHERE WidgetInstId = 10949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10949) END FROM WidgetInst WHERE WidgetInstId = 10949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10949) END FROM WidgetInst WHERE WidgetInstId = 10949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10949) END FROM WidgetInst WHERE WidgetInstId = 10949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10949) END FROM WidgetInst WHERE WidgetInstId = 10949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10949) END FROM WidgetInst WHERE WidgetInstId = 10949) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10964) END FROM WidgetInst WHERE WidgetInstId = 10964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10965;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10975;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10975;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10975;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10975;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10975;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10975;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10976;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10976;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10976;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10976;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10976;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10976;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10977;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10977;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10977;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10977;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10977;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10977;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10978;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10978;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10978;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10978;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10978;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10987) END FROM WidgetInst WHERE WidgetInstId = 10987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10988) END FROM WidgetInst WHERE WidgetInstId = 10988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10989) END FROM WidgetInst WHERE WidgetInstId = 10989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10990) END FROM WidgetInst WHERE WidgetInstId = 10990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11055) END FROM WidgetInst WHERE WidgetInstId = 11055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11056) END FROM WidgetInst WHERE WidgetInstId = 11056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11057) END FROM WidgetInst WHERE WidgetInstId = 11057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11058) END FROM WidgetInst WHERE WidgetInstId = 11058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11055) END FROM WidgetInst WHERE WidgetInstId = 11055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11056) END FROM WidgetInst WHERE WidgetInstId = 11056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11057) END FROM WidgetInst WHERE WidgetInstId = 11057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11058) END FROM WidgetInst WHERE WidgetInstId = 11058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11091) END FROM WidgetInst WHERE WidgetInstId = 11091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11092) END FROM WidgetInst WHERE WidgetInstId = 11092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11093) END FROM WidgetInst WHERE WidgetInstId = 11093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11094) END FROM WidgetInst WHERE WidgetInstId = 11094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11091) END FROM WidgetInst WHERE WidgetInstId = 11091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11092) END FROM WidgetInst WHERE WidgetInstId = 11092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11093) END FROM WidgetInst WHERE WidgetInstId = 11093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11094) END FROM WidgetInst WHERE WidgetInstId = 11094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11091) END FROM WidgetInst WHERE WidgetInstId = 11091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11092) END FROM WidgetInst WHERE WidgetInstId = 11092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11093) END FROM WidgetInst WHERE WidgetInstId = 11093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11094) END FROM WidgetInst WHERE WidgetInstId = 11094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11139) END FROM WidgetInst WHERE WidgetInstId = 11139)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11140) END FROM WidgetInst WHERE WidgetInstId = 11140)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11141) END FROM WidgetInst WHERE WidgetInstId = 11141)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11142) END FROM WidgetInst WHERE WidgetInstId = 11142)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11139) END FROM WidgetInst WHERE WidgetInstId = 11139)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11140) END FROM WidgetInst WHERE WidgetInstId = 11140)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11141) END FROM WidgetInst WHERE WidgetInstId = 11141)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11142) END FROM WidgetInst WHERE WidgetInstId = 11142)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11211) END FROM WidgetInst WHERE WidgetInstId = 11211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11212) END FROM WidgetInst WHERE WidgetInstId = 11212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11213) END FROM WidgetInst WHERE WidgetInstId = 11213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11214) END FROM WidgetInst WHERE WidgetInstId = 11214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11211) END FROM WidgetInst WHERE WidgetInstId = 11211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11212) END FROM WidgetInst WHERE WidgetInstId = 11212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11213) END FROM WidgetInst WHERE WidgetInstId = 11213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11214) END FROM WidgetInst WHERE WidgetInstId = 11214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11147) END FROM WidgetInst WHERE WidgetInstId = 11147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11148) END FROM WidgetInst WHERE WidgetInstId = 11148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11149) END FROM WidgetInst WHERE WidgetInstId = 11149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11150) END FROM WidgetInst WHERE WidgetInstId = 11150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11391) END FROM WidgetInst WHERE WidgetInstId = 11391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11392) END FROM WidgetInst WHERE WidgetInstId = 11392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11393) END FROM WidgetInst WHERE WidgetInstId = 11393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11394) END FROM WidgetInst WHERE WidgetInstId = 11394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11391) END FROM WidgetInst WHERE WidgetInstId = 11391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11392) END FROM WidgetInst WHERE WidgetInstId = 11392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11393) END FROM WidgetInst WHERE WidgetInstId = 11393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11394) END FROM WidgetInst WHERE WidgetInstId = 11394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11391) END FROM WidgetInst WHERE WidgetInstId = 11391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11392) END FROM WidgetInst WHERE WidgetInstId = 11392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11393) END FROM WidgetInst WHERE WidgetInstId = 11393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11394) END FROM WidgetInst WHERE WidgetInstId = 11394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11455) END FROM WidgetInst WHERE WidgetInstId = 11455) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11456) END FROM WidgetInst WHERE WidgetInstId = 11456) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11457) END FROM WidgetInst WHERE WidgetInstId = 11457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11458) END FROM WidgetInst WHERE WidgetInstId = 11458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11455) END FROM WidgetInst WHERE WidgetInstId = 11455) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11456) END FROM WidgetInst WHERE WidgetInstId = 11456) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11457) END FROM WidgetInst WHERE WidgetInstId = 11457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11458) END FROM WidgetInst WHERE WidgetInstId = 11458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11455) END FROM WidgetInst WHERE WidgetInstId = 11455) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11456) END FROM WidgetInst WHERE WidgetInstId = 11456) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11457) END FROM WidgetInst WHERE WidgetInstId = 11457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11458) END FROM WidgetInst WHERE WidgetInstId = 11458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11535) END FROM WidgetInst WHERE WidgetInstId = 11535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11536) END FROM WidgetInst WHERE WidgetInstId = 11536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11537) END FROM WidgetInst WHERE WidgetInstId = 11537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11538) END FROM WidgetInst WHERE WidgetInstId = 11538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11535) END FROM WidgetInst WHERE WidgetInstId = 11535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11536) END FROM WidgetInst WHERE WidgetInstId = 11536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11537) END FROM WidgetInst WHERE WidgetInstId = 11537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11538) END FROM WidgetInst WHERE WidgetInstId = 11538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11535) END FROM WidgetInst WHERE WidgetInstId = 11535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11536) END FROM WidgetInst WHERE WidgetInstId = 11536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11537) END FROM WidgetInst WHERE WidgetInstId = 11537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11538) END FROM WidgetInst WHERE WidgetInstId = 11538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11615) END FROM WidgetInst WHERE WidgetInstId = 11615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11616) END FROM WidgetInst WHERE WidgetInstId = 11616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11617) END FROM WidgetInst WHERE WidgetInstId = 11617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11618) END FROM WidgetInst WHERE WidgetInstId = 11618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11615) END FROM WidgetInst WHERE WidgetInstId = 11615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11616) END FROM WidgetInst WHERE WidgetInstId = 11616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11617) END FROM WidgetInst WHERE WidgetInstId = 11617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11618) END FROM WidgetInst WHERE WidgetInstId = 11618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11615) END FROM WidgetInst WHERE WidgetInstId = 11615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11616) END FROM WidgetInst WHERE WidgetInstId = 11616) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11617) END FROM WidgetInst WHERE WidgetInstId = 11617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11618) END FROM WidgetInst WHERE WidgetInstId = 11618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11639) END FROM WidgetInst WHERE WidgetInstId = 11639) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11615) END FROM WidgetInst WHERE WidgetInstId = 11615)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11640) END FROM WidgetInst WHERE WidgetInstId = 11640) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11616) END FROM WidgetInst WHERE WidgetInstId = 11616)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11641) END FROM WidgetInst WHERE WidgetInstId = 11641) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11617) END FROM WidgetInst WHERE WidgetInstId = 11617)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11642) END FROM WidgetInst WHERE WidgetInstId = 11642) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11618) END FROM WidgetInst WHERE WidgetInstId = 11618)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11639) END FROM WidgetInst WHERE WidgetInstId = 11639) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11615) END FROM WidgetInst WHERE WidgetInstId = 11615)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11640) END FROM WidgetInst WHERE WidgetInstId = 11640) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11616) END FROM WidgetInst WHERE WidgetInstId = 11616)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11641) END FROM WidgetInst WHERE WidgetInstId = 11641) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11617) END FROM WidgetInst WHERE WidgetInstId = 11617)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11642) END FROM WidgetInst WHERE WidgetInstId = 11642) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11618) END FROM WidgetInst WHERE WidgetInstId = 11618)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11639) END FROM WidgetInst WHERE WidgetInstId = 11639) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11615) END FROM WidgetInst WHERE WidgetInstId = 11615)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11640) END FROM WidgetInst WHERE WidgetInstId = 11640) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11616) END FROM WidgetInst WHERE WidgetInstId = 11616)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11641) END FROM WidgetInst WHERE WidgetInstId = 11641) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11617) END FROM WidgetInst WHERE WidgetInstId = 11617)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11642) END FROM WidgetInst WHERE WidgetInstId = 11642) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11618) END FROM WidgetInst WHERE WidgetInstId = 11618)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11675) END FROM WidgetInst WHERE WidgetInstId = 11675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11676) END FROM WidgetInst WHERE WidgetInstId = 11676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11677) END FROM WidgetInst WHERE WidgetInstId = 11677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11678) END FROM WidgetInst WHERE WidgetInstId = 11678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11675) END FROM WidgetInst WHERE WidgetInstId = 11675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11676) END FROM WidgetInst WHERE WidgetInstId = 11676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11677) END FROM WidgetInst WHERE WidgetInstId = 11677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11678) END FROM WidgetInst WHERE WidgetInstId = 11678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11675) END FROM WidgetInst WHERE WidgetInstId = 11675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11676) END FROM WidgetInst WHERE WidgetInstId = 11676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11677) END FROM WidgetInst WHERE WidgetInstId = 11677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11678) END FROM WidgetInst WHERE WidgetInstId = 11678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11675) END FROM WidgetInst WHERE WidgetInstId = 11675) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11676) END FROM WidgetInst WHERE WidgetInstId = 11676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11677) END FROM WidgetInst WHERE WidgetInstId = 11677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11678) END FROM WidgetInst WHERE WidgetInstId = 11678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11771) END FROM WidgetInst WHERE WidgetInstId = 11771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11772) END FROM WidgetInst WHERE WidgetInstId = 11772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11773) END FROM WidgetInst WHERE WidgetInstId = 11773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11774) END FROM WidgetInst WHERE WidgetInstId = 11774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11771) END FROM WidgetInst WHERE WidgetInstId = 11771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11772) END FROM WidgetInst WHERE WidgetInstId = 11772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11773) END FROM WidgetInst WHERE WidgetInstId = 11773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11774) END FROM WidgetInst WHERE WidgetInstId = 11774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11771) END FROM WidgetInst WHERE WidgetInstId = 11771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11772) END FROM WidgetInst WHERE WidgetInstId = 11772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11773) END FROM WidgetInst WHERE WidgetInstId = 11773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11774) END FROM WidgetInst WHERE WidgetInstId = 11774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11771) END FROM WidgetInst WHERE WidgetInstId = 11771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11772) END FROM WidgetInst WHERE WidgetInstId = 11772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11773) END FROM WidgetInst WHERE WidgetInstId = 11773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11774) END FROM WidgetInst WHERE WidgetInstId = 11774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11859) END FROM WidgetInst WHERE WidgetInstId = 11859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11860) END FROM WidgetInst WHERE WidgetInstId = 11860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11861) END FROM WidgetInst WHERE WidgetInstId = 11861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11862) END FROM WidgetInst WHERE WidgetInstId = 11862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11859) END FROM WidgetInst WHERE WidgetInstId = 11859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11860) END FROM WidgetInst WHERE WidgetInstId = 11860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11861) END FROM WidgetInst WHERE WidgetInstId = 11861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11862) END FROM WidgetInst WHERE WidgetInstId = 11862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11859) END FROM WidgetInst WHERE WidgetInstId = 11859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11860) END FROM WidgetInst WHERE WidgetInstId = 11860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11861) END FROM WidgetInst WHERE WidgetInstId = 11861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11862) END FROM WidgetInst WHERE WidgetInstId = 11862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11859) END FROM WidgetInst WHERE WidgetInstId = 11859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11860) END FROM WidgetInst WHERE WidgetInstId = 11860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11861) END FROM WidgetInst WHERE WidgetInstId = 11861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11862) END FROM WidgetInst WHERE WidgetInstId = 11862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11859) END FROM WidgetInst WHERE WidgetInstId = 11859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11860) END FROM WidgetInst WHERE WidgetInstId = 11860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11861) END FROM WidgetInst WHERE WidgetInstId = 11861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11862) END FROM WidgetInst WHERE WidgetInstId = 11862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11859) END FROM WidgetInst WHERE WidgetInstId = 11859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11860) END FROM WidgetInst WHERE WidgetInstId = 11860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11861) END FROM WidgetInst WHERE WidgetInstId = 11861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11862) END FROM WidgetInst WHERE WidgetInstId = 11862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10976) END FROM WidgetInst WHERE WidgetInstId = 10976) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10977) END FROM WidgetInst WHERE WidgetInstId = 10977) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10978) END FROM WidgetInst WHERE WidgetInstId = 10978) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11919) END FROM WidgetInst WHERE WidgetInstId = 11919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11920) END FROM WidgetInst WHERE WidgetInstId = 11920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11921) END FROM WidgetInst WHERE WidgetInstId = 11921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11922) END FROM WidgetInst WHERE WidgetInstId = 11922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11926;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 11933;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 11933;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 11933;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 11933;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 11933;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 11933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11936) END FROM WidgetInst WHERE WidgetInstId = 11936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10583) END FROM WidgetInst WHERE WidgetInstId = 10583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11953) END FROM WidgetInst WHERE WidgetInstId = 11953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11953) END FROM WidgetInst WHERE WidgetInstId = 11953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11962) END FROM WidgetInst WHERE WidgetInstId = 11962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11962) END FROM WidgetInst WHERE WidgetInstId = 11962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11962) END FROM WidgetInst WHERE WidgetInstId = 11962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11974) END FROM WidgetInst WHERE WidgetInstId = 11974)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11974) END FROM WidgetInst WHERE WidgetInstId = 11974)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11992) END FROM WidgetInst WHERE WidgetInstId = 11992) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11992) END FROM WidgetInst WHERE WidgetInstId = 11992) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11976) END FROM WidgetInst WHERE WidgetInstId = 11976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12037) END FROM WidgetInst WHERE WidgetInstId = 12037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12037) END FROM WidgetInst WHERE WidgetInstId = 12037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12037) END FROM WidgetInst WHERE WidgetInstId = 12037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12053) END FROM WidgetInst WHERE WidgetInstId = 12053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12053) END FROM WidgetInst WHERE WidgetInstId = 12053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12053) END FROM WidgetInst WHERE WidgetInstId = 12053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12073) END FROM WidgetInst WHERE WidgetInstId = 12073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12073) END FROM WidgetInst WHERE WidgetInstId = 12073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12073) END FROM WidgetInst WHERE WidgetInstId = 12073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12093) END FROM WidgetInst WHERE WidgetInstId = 12093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12093) END FROM WidgetInst WHERE WidgetInstId = 12093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12093) END FROM WidgetInst WHERE WidgetInstId = 12093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12099) END FROM WidgetInst WHERE WidgetInstId = 12099) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12093) END FROM WidgetInst WHERE WidgetInstId = 12093)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12099) END FROM WidgetInst WHERE WidgetInstId = 12099) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12093) END FROM WidgetInst WHERE WidgetInstId = 12093)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12099) END FROM WidgetInst WHERE WidgetInstId = 12099) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12093) END FROM WidgetInst WHERE WidgetInstId = 12093)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12132) END FROM WidgetInst WHERE WidgetInstId = 12132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12132) END FROM WidgetInst WHERE WidgetInstId = 12132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12132) END FROM WidgetInst WHERE WidgetInstId = 12132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12132) END FROM WidgetInst WHERE WidgetInstId = 12132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 12154) END FROM WidgetInst WHERE WidgetInstId = 12154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12154) END FROM WidgetInst WHERE WidgetInstId = 12154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12154) END FROM WidgetInst WHERE WidgetInstId = 12154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12154) END FROM WidgetInst WHERE WidgetInstId = 12154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12154) END FROM WidgetInst WHERE WidgetInstId = 12154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12154) END FROM WidgetInst WHERE WidgetInstId = 12154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11933) END FROM WidgetInst WHERE WidgetInstId = 11933) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10586) END FROM WidgetInst WHERE WidgetInstId = 10586)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 12169) END FROM WidgetInst WHERE WidgetInstId = 12169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 12230) END FROM WidgetInst WHERE WidgetInstId = 12230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12230) END FROM WidgetInst WHERE WidgetInstId = 12230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 12243) END FROM WidgetInst WHERE WidgetInstId = 12243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 12245) END FROM WidgetInst WHERE WidgetInstId = 12245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 12238) END FROM WidgetInst WHERE WidgetInstId = 12238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 12322) END FROM WidgetInst WHERE WidgetInstId = 12322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12332) END FROM WidgetInst WHERE WidgetInstId = 12332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 12335) END FROM WidgetInst WHERE WidgetInstId = 12335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 12340) END FROM WidgetInst WHERE WidgetInstId = 12340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 12340) END FROM WidgetInst WHERE WidgetInstId = 12340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12332) END FROM WidgetInst WHERE WidgetInstId = 12332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12358;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12372;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12372;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12372;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12372;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12372;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12375) END FROM WidgetInst WHERE WidgetInstId = 12375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12392) END FROM WidgetInst WHERE WidgetInstId = 12392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12392) END FROM WidgetInst WHERE WidgetInstId = 12392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12401) END FROM WidgetInst WHERE WidgetInstId = 12401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12401) END FROM WidgetInst WHERE WidgetInstId = 12401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12401) END FROM WidgetInst WHERE WidgetInstId = 12401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12413) END FROM WidgetInst WHERE WidgetInstId = 12413)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12413) END FROM WidgetInst WHERE WidgetInstId = 12413)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12431) END FROM WidgetInst WHERE WidgetInstId = 12431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12431) END FROM WidgetInst WHERE WidgetInstId = 12431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12415) END FROM WidgetInst WHERE WidgetInstId = 12415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12476) END FROM WidgetInst WHERE WidgetInstId = 12476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12476) END FROM WidgetInst WHERE WidgetInstId = 12476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12476) END FROM WidgetInst WHERE WidgetInstId = 12476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12492) END FROM WidgetInst WHERE WidgetInstId = 12492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12492) END FROM WidgetInst WHERE WidgetInstId = 12492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12492) END FROM WidgetInst WHERE WidgetInstId = 12492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12512) END FROM WidgetInst WHERE WidgetInstId = 12512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12512) END FROM WidgetInst WHERE WidgetInstId = 12512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12512) END FROM WidgetInst WHERE WidgetInstId = 12512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12532) END FROM WidgetInst WHERE WidgetInstId = 12532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12532) END FROM WidgetInst WHERE WidgetInstId = 12532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12532) END FROM WidgetInst WHERE WidgetInstId = 12532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12538) END FROM WidgetInst WHERE WidgetInstId = 12538) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12532) END FROM WidgetInst WHERE WidgetInstId = 12532)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12538) END FROM WidgetInst WHERE WidgetInstId = 12538) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12532) END FROM WidgetInst WHERE WidgetInstId = 12532)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12538) END FROM WidgetInst WHERE WidgetInstId = 12538) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12532) END FROM WidgetInst WHERE WidgetInstId = 12532)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12547) END FROM WidgetInst WHERE WidgetInstId = 12547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12547) END FROM WidgetInst WHERE WidgetInstId = 12547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12547) END FROM WidgetInst WHERE WidgetInstId = 12547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12547) END FROM WidgetInst WHERE WidgetInstId = 12547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12372) END FROM WidgetInst WHERE WidgetInstId = 12372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12571) END FROM WidgetInst WHERE WidgetInstId = 12571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12571) END FROM WidgetInst WHERE WidgetInstId = 12571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12571) END FROM WidgetInst WHERE WidgetInstId = 12571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12571) END FROM WidgetInst WHERE WidgetInstId = 12571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 12593) END FROM WidgetInst WHERE WidgetInstId = 12593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12593) END FROM WidgetInst WHERE WidgetInstId = 12593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12593) END FROM WidgetInst WHERE WidgetInstId = 12593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12593) END FROM WidgetInst WHERE WidgetInstId = 12593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12593) END FROM WidgetInst WHERE WidgetInstId = 12593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12593) END FROM WidgetInst WHERE WidgetInstId = 12593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 12608) END FROM WidgetInst WHERE WidgetInstId = 12608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12609;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12619;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12619;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12619;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12619;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12619;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12619;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12620;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12620;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12620;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12620;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12620;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12620;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12622;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12622;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12622;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12622;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12622;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12631) END FROM WidgetInst WHERE WidgetInstId = 12631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12632) END FROM WidgetInst WHERE WidgetInstId = 12632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12633) END FROM WidgetInst WHERE WidgetInstId = 12633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12634) END FROM WidgetInst WHERE WidgetInstId = 12634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12699) END FROM WidgetInst WHERE WidgetInstId = 12699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12700) END FROM WidgetInst WHERE WidgetInstId = 12700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12701) END FROM WidgetInst WHERE WidgetInstId = 12701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12702) END FROM WidgetInst WHERE WidgetInstId = 12702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12699) END FROM WidgetInst WHERE WidgetInstId = 12699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12700) END FROM WidgetInst WHERE WidgetInstId = 12700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12701) END FROM WidgetInst WHERE WidgetInstId = 12701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12702) END FROM WidgetInst WHERE WidgetInstId = 12702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12735) END FROM WidgetInst WHERE WidgetInstId = 12735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12736) END FROM WidgetInst WHERE WidgetInstId = 12736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12737) END FROM WidgetInst WHERE WidgetInstId = 12737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12738) END FROM WidgetInst WHERE WidgetInstId = 12738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12735) END FROM WidgetInst WHERE WidgetInstId = 12735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12736) END FROM WidgetInst WHERE WidgetInstId = 12736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12737) END FROM WidgetInst WHERE WidgetInstId = 12737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12738) END FROM WidgetInst WHERE WidgetInstId = 12738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12735) END FROM WidgetInst WHERE WidgetInstId = 12735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12736) END FROM WidgetInst WHERE WidgetInstId = 12736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12737) END FROM WidgetInst WHERE WidgetInstId = 12737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12738) END FROM WidgetInst WHERE WidgetInstId = 12738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12783) END FROM WidgetInst WHERE WidgetInstId = 12783)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12784) END FROM WidgetInst WHERE WidgetInstId = 12784)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12785) END FROM WidgetInst WHERE WidgetInstId = 12785)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12786) END FROM WidgetInst WHERE WidgetInstId = 12786)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12783) END FROM WidgetInst WHERE WidgetInstId = 12783)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12784) END FROM WidgetInst WHERE WidgetInstId = 12784)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12785) END FROM WidgetInst WHERE WidgetInstId = 12785)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12786) END FROM WidgetInst WHERE WidgetInstId = 12786)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12855) END FROM WidgetInst WHERE WidgetInstId = 12855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12856) END FROM WidgetInst WHERE WidgetInstId = 12856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12857) END FROM WidgetInst WHERE WidgetInstId = 12857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12858) END FROM WidgetInst WHERE WidgetInstId = 12858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12855) END FROM WidgetInst WHERE WidgetInstId = 12855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12856) END FROM WidgetInst WHERE WidgetInstId = 12856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12857) END FROM WidgetInst WHERE WidgetInstId = 12857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12858) END FROM WidgetInst WHERE WidgetInstId = 12858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12791) END FROM WidgetInst WHERE WidgetInstId = 12791) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12792) END FROM WidgetInst WHERE WidgetInstId = 12792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12793) END FROM WidgetInst WHERE WidgetInstId = 12793) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12794) END FROM WidgetInst WHERE WidgetInstId = 12794) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13035) END FROM WidgetInst WHERE WidgetInstId = 13035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13036) END FROM WidgetInst WHERE WidgetInstId = 13036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13037) END FROM WidgetInst WHERE WidgetInstId = 13037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13038) END FROM WidgetInst WHERE WidgetInstId = 13038) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13035) END FROM WidgetInst WHERE WidgetInstId = 13035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13036) END FROM WidgetInst WHERE WidgetInstId = 13036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13037) END FROM WidgetInst WHERE WidgetInstId = 13037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13038) END FROM WidgetInst WHERE WidgetInstId = 13038) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13035) END FROM WidgetInst WHERE WidgetInstId = 13035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13036) END FROM WidgetInst WHERE WidgetInstId = 13036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13037) END FROM WidgetInst WHERE WidgetInstId = 13037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13038) END FROM WidgetInst WHERE WidgetInstId = 13038) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13099) END FROM WidgetInst WHERE WidgetInstId = 13099) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13100) END FROM WidgetInst WHERE WidgetInstId = 13100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13101) END FROM WidgetInst WHERE WidgetInstId = 13101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13102) END FROM WidgetInst WHERE WidgetInstId = 13102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13099) END FROM WidgetInst WHERE WidgetInstId = 13099) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13100) END FROM WidgetInst WHERE WidgetInstId = 13100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13101) END FROM WidgetInst WHERE WidgetInstId = 13101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13102) END FROM WidgetInst WHERE WidgetInstId = 13102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13099) END FROM WidgetInst WHERE WidgetInstId = 13099) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13100) END FROM WidgetInst WHERE WidgetInstId = 13100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13101) END FROM WidgetInst WHERE WidgetInstId = 13101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13102) END FROM WidgetInst WHERE WidgetInstId = 13102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13179) END FROM WidgetInst WHERE WidgetInstId = 13179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13180) END FROM WidgetInst WHERE WidgetInstId = 13180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13181) END FROM WidgetInst WHERE WidgetInstId = 13181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13182) END FROM WidgetInst WHERE WidgetInstId = 13182) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13179) END FROM WidgetInst WHERE WidgetInstId = 13179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13180) END FROM WidgetInst WHERE WidgetInstId = 13180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13181) END FROM WidgetInst WHERE WidgetInstId = 13181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13182) END FROM WidgetInst WHERE WidgetInstId = 13182) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13179) END FROM WidgetInst WHERE WidgetInstId = 13179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13180) END FROM WidgetInst WHERE WidgetInstId = 13180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13181) END FROM WidgetInst WHERE WidgetInstId = 13181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13182) END FROM WidgetInst WHERE WidgetInstId = 13182) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13259) END FROM WidgetInst WHERE WidgetInstId = 13259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13260) END FROM WidgetInst WHERE WidgetInstId = 13260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13261) END FROM WidgetInst WHERE WidgetInstId = 13261) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13259) END FROM WidgetInst WHERE WidgetInstId = 13259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13260) END FROM WidgetInst WHERE WidgetInstId = 13260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13261) END FROM WidgetInst WHERE WidgetInstId = 13261) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13259) END FROM WidgetInst WHERE WidgetInstId = 13259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13260) END FROM WidgetInst WHERE WidgetInstId = 13260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13261) END FROM WidgetInst WHERE WidgetInstId = 13261) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13283) END FROM WidgetInst WHERE WidgetInstId = 13283) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13259) END FROM WidgetInst WHERE WidgetInstId = 13259)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13284) END FROM WidgetInst WHERE WidgetInstId = 13284) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13260) END FROM WidgetInst WHERE WidgetInstId = 13260)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13285) END FROM WidgetInst WHERE WidgetInstId = 13285) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13261) END FROM WidgetInst WHERE WidgetInstId = 13261)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13286) END FROM WidgetInst WHERE WidgetInstId = 13286) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13283) END FROM WidgetInst WHERE WidgetInstId = 13283) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13259) END FROM WidgetInst WHERE WidgetInstId = 13259)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13284) END FROM WidgetInst WHERE WidgetInstId = 13284) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13260) END FROM WidgetInst WHERE WidgetInstId = 13260)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13285) END FROM WidgetInst WHERE WidgetInstId = 13285) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13261) END FROM WidgetInst WHERE WidgetInstId = 13261)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13286) END FROM WidgetInst WHERE WidgetInstId = 13286) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13283) END FROM WidgetInst WHERE WidgetInstId = 13283) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13259) END FROM WidgetInst WHERE WidgetInstId = 13259)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13284) END FROM WidgetInst WHERE WidgetInstId = 13284) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13260) END FROM WidgetInst WHERE WidgetInstId = 13260)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13285) END FROM WidgetInst WHERE WidgetInstId = 13285) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13261) END FROM WidgetInst WHERE WidgetInstId = 13261)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13286) END FROM WidgetInst WHERE WidgetInstId = 13286) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13319) END FROM WidgetInst WHERE WidgetInstId = 13319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13320) END FROM WidgetInst WHERE WidgetInstId = 13320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13322) END FROM WidgetInst WHERE WidgetInstId = 13322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13319) END FROM WidgetInst WHERE WidgetInstId = 13319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13320) END FROM WidgetInst WHERE WidgetInstId = 13320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13322) END FROM WidgetInst WHERE WidgetInstId = 13322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13319) END FROM WidgetInst WHERE WidgetInstId = 13319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13320) END FROM WidgetInst WHERE WidgetInstId = 13320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13322) END FROM WidgetInst WHERE WidgetInstId = 13322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13319) END FROM WidgetInst WHERE WidgetInstId = 13319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13320) END FROM WidgetInst WHERE WidgetInstId = 13320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13322) END FROM WidgetInst WHERE WidgetInstId = 13322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13415) END FROM WidgetInst WHERE WidgetInstId = 13415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13416) END FROM WidgetInst WHERE WidgetInstId = 13416) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13417) END FROM WidgetInst WHERE WidgetInstId = 13417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13418) END FROM WidgetInst WHERE WidgetInstId = 13418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13415) END FROM WidgetInst WHERE WidgetInstId = 13415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13416) END FROM WidgetInst WHERE WidgetInstId = 13416) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13417) END FROM WidgetInst WHERE WidgetInstId = 13417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13418) END FROM WidgetInst WHERE WidgetInstId = 13418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13415) END FROM WidgetInst WHERE WidgetInstId = 13415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13416) END FROM WidgetInst WHERE WidgetInstId = 13416) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13417) END FROM WidgetInst WHERE WidgetInstId = 13417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 13418) END FROM WidgetInst WHERE WidgetInstId = 13418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13415) END FROM WidgetInst WHERE WidgetInstId = 13415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13416) END FROM WidgetInst WHERE WidgetInstId = 13416) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13417) END FROM WidgetInst WHERE WidgetInstId = 13417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13418) END FROM WidgetInst WHERE WidgetInstId = 13418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13503) END FROM WidgetInst WHERE WidgetInstId = 13503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13504) END FROM WidgetInst WHERE WidgetInstId = 13504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13505) END FROM WidgetInst WHERE WidgetInstId = 13505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13506) END FROM WidgetInst WHERE WidgetInstId = 13506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13503) END FROM WidgetInst WHERE WidgetInstId = 13503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13504) END FROM WidgetInst WHERE WidgetInstId = 13504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13505) END FROM WidgetInst WHERE WidgetInstId = 13505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13506) END FROM WidgetInst WHERE WidgetInstId = 13506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13503) END FROM WidgetInst WHERE WidgetInstId = 13503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13504) END FROM WidgetInst WHERE WidgetInstId = 13504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13505) END FROM WidgetInst WHERE WidgetInstId = 13505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13506) END FROM WidgetInst WHERE WidgetInstId = 13506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13503) END FROM WidgetInst WHERE WidgetInstId = 13503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13504) END FROM WidgetInst WHERE WidgetInstId = 13504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13505) END FROM WidgetInst WHERE WidgetInstId = 13505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13506) END FROM WidgetInst WHERE WidgetInstId = 13506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13503) END FROM WidgetInst WHERE WidgetInstId = 13503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13504) END FROM WidgetInst WHERE WidgetInstId = 13504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13505) END FROM WidgetInst WHERE WidgetInstId = 13505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13506) END FROM WidgetInst WHERE WidgetInstId = 13506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13503) END FROM WidgetInst WHERE WidgetInstId = 13503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13504) END FROM WidgetInst WHERE WidgetInstId = 13504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13505) END FROM WidgetInst WHERE WidgetInstId = 13505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13506) END FROM WidgetInst WHERE WidgetInstId = 13506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12619) END FROM WidgetInst WHERE WidgetInstId = 12619) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12230) END FROM WidgetInst WHERE WidgetInstId = 12230)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12620) END FROM WidgetInst WHERE WidgetInstId = 12620) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12230) END FROM WidgetInst WHERE WidgetInstId = 12230)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12621) END FROM WidgetInst WHERE WidgetInstId = 12621) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12230) END FROM WidgetInst WHERE WidgetInstId = 12230)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12622) END FROM WidgetInst WHERE WidgetInstId = 12622) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12230) END FROM WidgetInst WHERE WidgetInstId = 12230)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 13563) END FROM WidgetInst WHERE WidgetInstId = 13563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 13564) END FROM WidgetInst WHERE WidgetInstId = 13564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 13565) END FROM WidgetInst WHERE WidgetInstId = 13565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 13566) END FROM WidgetInst WHERE WidgetInstId = 13566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13570;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 13577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 13577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 13577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 13577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 13577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 13577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 13577) END FROM WidgetInst WHERE WidgetInstId = 13577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 13580) END FROM WidgetInst WHERE WidgetInstId = 13580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 13577) END FROM WidgetInst WHERE WidgetInstId = 13577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 12227) END FROM WidgetInst WHERE WidgetInstId = 12227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 13577) END FROM WidgetInst WHERE WidgetInstId = 13577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13597) END FROM WidgetInst WHERE WidgetInstId = 13597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13597) END FROM WidgetInst WHERE WidgetInstId = 13597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 13577) END FROM WidgetInst WHERE WidgetInstId = 13577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13606) END FROM WidgetInst WHERE WidgetInstId = 13606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13606) END FROM WidgetInst WHERE WidgetInstId = 13606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 13606) END FROM WidgetInst WHERE WidgetInstId = 13606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 13577) END FROM WidgetInst WHERE WidgetInstId = 13577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 13577) END FROM WidgetInst WHERE WidgetInstId = 13577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13618) END FROM WidgetInst WHERE WidgetInstId = 13618)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13620) END FROM WidgetInst WHERE WidgetInstId = 13620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13620) END FROM WidgetInst WHERE WidgetInstId = 13620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13620) END FROM WidgetInst WHERE WidgetInstId = 13620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13620) END FROM WidgetInst WHERE WidgetInstId = 13620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13629;


